package com.naiterui.ehp.bp.enums;

/**
 *
 * @author 胡超雄
 * @date 2021/4/2 10:20
 * @desc   服务范围枚举 1
 */
public enum ServiceAreaEnum {

    SMART_SECURITY(1, "智能安防"),
    ;
    private Integer code;
    private String name;

    ServiceAreaEnum(Integer code, String name) {
        this.code = code;
        this.name = name;
    }

    public static ServiceAreaEnum getByCode(Integer code) {
        for (ServiceAreaEnum tmpEnum : values()) {
            if (tmpEnum.getCode().equals(code)) {
                return tmpEnum;
            }
        }
        return null;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

}
